package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysProfessionalActivityMapper;
import com.ruoyi.system.domain.SysProfessionalActivity;
import com.ruoyi.system.service.ISysProfessionalActivityService;

/**
 * 专业活动记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-27
 */
@Service
public class SysProfessionalActivityServiceImpl implements ISysProfessionalActivityService 
{
    @Autowired
    private SysProfessionalActivityMapper sysProfessionalActivityMapper;

    /**
     * 查询专业活动记录
     * 
     * @param activityId 专业活动记录主键
     * @return 专业活动记录
     */
    @Override
    public SysProfessionalActivity selectSysProfessionalActivityByActivityId(Long activityId)
    {
        return sysProfessionalActivityMapper.selectSysProfessionalActivityByActivityId(activityId);
    }

    /**
     * 查询专业活动记录列表
     * 
     * @param sysProfessionalActivity 专业活动记录
     * @return 专业活动记录
     */
    @Override
    public List<SysProfessionalActivity> selectSysProfessionalActivityList(SysProfessionalActivity sysProfessionalActivity)
    {
        return sysProfessionalActivityMapper.selectSysProfessionalActivityList(sysProfessionalActivity);
    }

    /**
     * 新增专业活动记录
     * 
     * @param sysProfessionalActivity 专业活动记录
     * @return 结果
     */
    @Override
    public int insertSysProfessionalActivity(SysProfessionalActivity sysProfessionalActivity)
    {
        sysProfessionalActivity.setCreateTime(DateUtils.getNowDate());
        return sysProfessionalActivityMapper.insertSysProfessionalActivity(sysProfessionalActivity);
    }

    /**
     * 修改专业活动记录
     * 
     * @param sysProfessionalActivity 专业活动记录
     * @return 结果
     */
    @Override
    public int updateSysProfessionalActivity(SysProfessionalActivity sysProfessionalActivity)
    {
        sysProfessionalActivity.setUpdateTime(DateUtils.getNowDate());
        return sysProfessionalActivityMapper.updateSysProfessionalActivity(sysProfessionalActivity);
    }

    /**
     * 批量删除专业活动记录
     * 
     * @param activityIds 需要删除的专业活动记录主键
     * @return 结果
     */
    @Override
    public int deleteSysProfessionalActivityByActivityIds(Long[] activityIds)
    {
        return sysProfessionalActivityMapper.deleteSysProfessionalActivityByActivityIds(activityIds);
    }

    /**
     * 删除专业活动记录信息
     * 
     * @param activityId 专业活动记录主键
     * @return 结果
     */
    @Override
    public int deleteSysProfessionalActivityByActivityId(Long activityId)
    {
        return sysProfessionalActivityMapper.deleteSysProfessionalActivityByActivityId(activityId);
    }
}
